<?php

class Application_Model_DbTable_Frais extends Zend_Db_Table_Abstract
{
protected $_name = 'fraisforfait';
protected $_primary = 'id';

 public function obtenirFicheFrais($id) {
        $row = $this->fetchRow("id='".$id."'"); // champ alphanum
        if(!$row) {
            throw new Exception("impossible de trouver l'enregistrement $id");
        }
        return $row->toArray();
    }

    public function modifierFicheFrais($id, $libelle, $montant) {
        $data = array(
            'id' => $id,
            'libelle' => $libelle,
            'montant' => $montant,
        );
        $this->update($data, "id='" . $id."'");
    }
}

